#ifndef FORTRESS_MESSAGECONTROLLER_H
#define FORTRESS_MESSAGECONTROLLER_H

#include <string>
#include <queue>

namespace fortress
{
	class view;

	class messageController
	{
	private:
		messageController();
		~messageController();
		messageController(const messageController &);             // intentionally undefined
		messageController & operator=(const messageController &); // intentionally undefined
		view * screen;
		std::string * test;
		std::queue<std::string*> messageQueue;
	
	public:
		// Singleton pattern
		static messageController & getInstance();
		// Sets a pointer to the view object we will print to
		void setView(view * viewObject);
		// Adds a message to the queue
		messageController const & addMessage(std::string const & message);
		// Immediately handles an error message
		messageController const & error(std::string const & message) const;
		// Immediately prints a debug message
		messageController const & debug(std::string const & message) const;
		messageController const & debug(int message) const;
		// Reads the top element from the queue
		bool displayMessages(); // Returns true if there are more messages queued
	};

};


#endif